/*
 *  Copyright (C) 2010 Martin Haulrich <mwh.isv@cbs.dk>
 *
 *  This file is part of the MatrixParser package.
 *
 *  The MatrixParser program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.osdtsystem.matrixparser.features;

import java.io.Serializable;
import java.util.Collection;
import java.util.Map.Entry;
import org.osdtsystem.matrixparser.features.keys.FeatureKey;

/**
 *
 * @author Martin Haulrich
 */
public interface FeatureVector extends Serializable, Collection<Entry<Feature,Double>> {
    public int size();
    public double getValue(Feature f);
    public void setValue(Feature f, double v);
    public void addValue(Feature f, double v);
    public void addValue(FeatureHandler fh, CharSequence chars, double v);
    public void addValue(FeatureHandler fh, FeatureKey key, double v);
    public int checksum();
    public String checksum64();
    public void ignoreFeatures(FeatureVector fv);
    public void add(FeatureVector fv);
    public void trimToSize();
    public void addTo(float scalar, FeatureVector fv);
    public double innerProduct(FeatureVector fv);
    
    public final static FeatureVector emptyReadOnlyFeatureVector = new SparseFeatureVector();
}
